home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / Anim / Operators / Fade < prev    next >
Encoding:
Text File  |  2001-03-31  |  890 b   |  66 lines

  1. /* Effect Operators Mosaic
  2. 000
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.         pp_ComposeReqOff        
  21.         pp_GetCurrentBrush
  22.         CB=result
  23.         pp_FindEmptyBrush
  24.         Brush=result
  25.         pp_SetBrush Brush
  26.         pp_GotoFrame s1
  27.         pp_PicttoSpare
  28.         pp_GotoFrame s0            
  29.         pp_Pickbrush 0 0 W H
  30.         
  31.         step=(s1-s0)
  32.         Step_f=100/Step
  33.         pp_Spare
  34.         pp_EffectOn
  35.         DO i=s0 to s1
  36.  
  37.             IF t1=1 then DO
  38.                 pp_GotoFrame (s1+i-s0)
  39.                 pp_PicttoSpare
  40.             END
  41.  
  42.             pp_GotoFrame i
  43.  
  44.             if t0=0 then DO
  45.                 pp_EffectOff
  46.                 pp_Compose 0 100 0
  47.                 pp_plot W/2 H/2
  48.                 pp_EffectOn
  49.             END
  50.  
  51.             f=Step_f*(i-s0)
  52.             pp_Compose 0 f 0
  53.             pp_boxf 0 0 W H
  54.         END
  55.         pp_FreeBrush
  56.         pp_SetBrush CB
  57.  
  58.         pp_Gotoframe s0
  59.         pp_FreeBrush
  60.         pp_SetBrush CB
  61.  
  62.         pp_EffectOff
  63.         pp_ComposeReqOn    
  64.  
  65.     EXIT
  66.